package com.lu.component.rpc.model.exceptions;

import com.lu.component.rpc.model.domain.response.RpcResponse;

/**
 * rpc异常
 *
 * @author: zhanglu
 * @date: 2023/7/9 18:56
 * @modify: 修改人信息, 修改内容 2023/7/9 18:56
 */
public class RpcExeception extends RuntimeException {

    private RpcResponse response;

    public RpcExeception(String errorMsg) {
        super(errorMsg);
    }

    public RpcExeception(String errorMsg, RpcResponse response) {
        super(errorMsg);
        this.response = response;
        this.response.setErrorMsg(errorMsg);
    }

    public RpcResponse getResponse() {
        return response;
    }

}
